const express = require('express');
const router = express.Router();
const data = [];
const count = 1;
router.get('/forPartOrderPi', (req, res) => {
    res.json(
        {
            message: 'string',
            payload: {
                partId: '1',
                partCode: 'partCode',
                partName: 'partName',
                price: 65.95,
                isEstimated: true
            }
        }
    );
});
for(let i = 1; i < 51; i++)
    data.push({
        id: `${i}`,
        partCode: `XS2019082700-${i}`,
        partName: '备件',
        brandCode: 'Chery',
        currency: 1,
        type: 1,
        isEstimated: !(count % 2),
        price: 50,
        beginDate: '2019-08-04T02:37:44.918Z',
        endDate: '2019-08-04T02:37:44.918Z',
        customerCode: '10145',
    });
router.get('/forCurrentUser', (req, res) => {
    const {pageIndex, pageSize} = req.query;
    res.json({
        message: 'ok',
        payload: {
            content: data,
            pageIndex: parseInt(pageIndex, 10),
            pageSize: parseInt(pageSize, 10),
            totalElements: 100
        }
    });
});
router.get('/export/forCurrentUser', (req, res) => {
    res.json({
        message: '导出成功',
        payload: 'Mock导出'
    });
});
module.exports = router;
